local shajue = fk.CreateSkill {

  name = "joy__shajue",

  tags = { Skill.Compulsory, },

}



shajue:addEffect(fk.EnterDying, {
  name = "joy__shajue",
  anim_type = "offensive",
  frequency = Skill.Compulsory,
  events = {fk.EnterDying},
  can_trigger = function(self, event, target, player, data)
    return target ~= player and player:hasSkill(shajue.name) and target.hp < 0
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:addPlayerMark(player, "@joy__baoli", 1)
    if data.damage and data.damage.card and U.hasFullRealCard(room, data.damage.card) then
      room:obtainCard(player, data.damage.card, true, fk.ReasonPrey)
    end
  end
})

return shajue